<?php
date_default_timezone_set('Europe/Bucharest');
error_reporting(E_ALL);

if($image = file_get_contents('http://www.inmh.ro/images/clima/temperatura_orara.png'))
{
  if(!file_exists(dirname(__FILE__).'/../../data/temperaturi'))
  {
    mkdir(dirname(__FILE__).'/../../data/temperaturi');
  }
  file_put_contents(dirname(__FILE__).'/../../data/temperaturi/'.date('YmdH').'.png', $image);
}
